package com.example.demo.service;

import org.springframework.beans.factory.annotation.*;
import org.springframework.stereotype.Service;

@Service
public class DemoBeanService {

    private final DemoService demoService;

    @Autowired
    public DemoBeanService(DemoService demoService) {
        this.demoService = demoService;
    }

    public void displayMessage() {
        System.out.println(demoService.getMessage());

    }
}
